<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo">
      	
  	<link rel="stylesheet" type="text/css" href="./estilos.css"/>
<h:form id="formManterUsuarioProjeto" prependId="false">  
    <p:panel id="panelManterUsuarioProjeto" header="Cadastrar Novo Projeto" style="margin-bottom:20px;">  
    <f:facet name="header">
    	<h:outputText value="Cadastrar Novo Projeto" styleClass="outputTextTitulo" />
    </f:facet>
        <p:growl id="messages" />  
        
        <h:panelGrid columns="4">
        	<p:outputLabel value="Código do Projeto"  styleClass="outputLabel"/>
        	<p:inputText value="#{projetoBean.projetoSelecionado.idProjeto}" styleClass="inputId" disabled="true"/>
        	<p:outputLabel value="Nome do Projeto" styleClass="outputLabel" />
        	<p:inputText value="#{projetoBean.projetoSelecionado.nomeProjeto}" styleClass="inputDescricao" required="true" requiredMessage="Informar o nome do Projeto!"/>        
        </h:panelGrid>
        <h:panelGrid columns="2">
        	<p:outputLabel value="Descrição"  styleClass="outputLabel"/>
        	<p:inputText value="#{projetoBean.projetoSelecionado.descricao}" styleClass="inputDescricao" />     
        </h:panelGrid>
 		<h:panelGrid columns="4">
        	<p:outputLabel value="Data inicial" styleClass="outputLabel" />
        	<p:inputMask value="#{projetoBean.dtInicial}" mask="99/99/9999" styleClass="inputData" required="true" requiredMessage="Informar a data inicial!"/>
        	<p:outputLabel value="Data final" styleClass="outputLabel" />
        	<p:inputMask value="#{projetoBean.dtFinal}" mask="99/99/9999" required="true" requiredMessage="Informar a Data final!" styleClass="inputData"/>       
        </h:panelGrid>
		<h:panelGrid columns="2">
            <p:outputLabel value="Defina o Status do projeto:" styleClass="outputLabel"/>  
			<p:selectOneMenu id="stringStatus" style="font-size:12px" value="#{projetoBean.stringStatus}" label="Status do Projeto"  panelStyle="width:210px" disabled="true" >  
        		<f:selectItems value="#{projetoBean.arrayStatus}" />  
    		</p:selectOneMenu> 
		</h:panelGrid>
		<h:panelGrid columns="3">
        	<p:outputLabel value="Gerente" styleClass="outputLabel" />
        	<p:inputText value="#{projetoBean.projetoSelecionado.usuario.nome}" styleClass="inputDescricao" disabled="true" />    
        	
        </h:panelGrid>
    </p:panel>  
  
    <p:commandButton value="Salvar" action="#{projetoBean.saveProjeto}" update="idPanelManterProjeto" style="margin-right:20px; margin-left:10px;" />  
    <p:commandButton value="Cancelar" update="idPanelManterProjeto" style="margin-right:20px;" />
    <p:commandButton value="Limpar" update="idPanelManterProjeto" style="margin-right:20px;" />
    
    <ui:include src="dialogConsultarUsuario.xhtml"></ui:include>
   
</h:form>  	
      </ui:define>

	</ui:composition>
